<?php
require_once("ISearchMember.php");
class MemberNameAlternative implements ISearchMember{
	public function Search (array $member, $keyword){
		$pattern = "/".$keyword."/i";
		$i = 0;
		
		foreach ($member as $key =>$value){
			if(preg_match($pattern, $value->m_firstName) > 0){
				$result[$i] = $value;
				$i++; 
			}
		}
		if(!empty($result)){
			var_dump($result);
		}else{
			echo"inga sökresultat";
		}
	}
}